package com.cykj.admin.controller;

import com.cykj.admin.annotation.MyLog;
import com.cykj.admin.service.IIndustryService;
import com.cykj.admin.vo.IndustryVO;
import com.cykj.common.dto.ResponseDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject: smart_recruit_backend
 * @BelongsPackage: com.cykj.admin.controller
 * @Author: 小小卢
 * @CreateTime: 2025-08-20 16:13
 * @Description: TODO
 * @Version: 1.0
 */
@Tag(name = "IndustryController",description = "平台端行业管理的接口")
@RestController
@RequestMapping("industry")
public class IndustryController {

    @Autowired
    private IIndustryService industryService;

    /**
    * @Description: 查询vip规则
    * @Param: [industryVO]
    * @return: com.cykj.common.dto.ResponseDTO
    */
    @Operation(summary = "平台端查询行业信息接口")
    @GetMapping("select")
    public ResponseDTO selectIndustry(IndustryVO industryVO){
        return industryService.selectIndustry(industryVO);
    }

    /**
    * @Description: 新增行业
    * @Param: [industryVO]
    * @return: com.cykj.common.dto.ResponseDTO
    */
    @MyLog("新增行业")
    @Operation(summary = "平台端新增行业接口")
    @PostMapping("add")
    public ResponseDTO addIndustry(@RequestBody IndustryVO industryVO){
        return industryService.addIndustry(industryVO);
    }

    /**
    * @Description: 修改行业
    * @Param: [industryVO]
    * @return: com.cykj.common.dto.ResponseDTO
    */
    @MyLog("修改行业信息")
    @Operation(summary = "平台端修改行业信息接口")
    @PostMapping("update")
    public ResponseDTO updateIndustry(@RequestBody IndustryVO industryVO){
        return industryService.updateIndustry(industryVO);
    }

}